package com.yellowpage.bigdata.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.yellowpage.bigdata.data.ActiveWeek;
import com.yellowpage.bigdata.service.ActiveWeekService;
import com.yellowpage.white.struts.BaseAction;

public class ActiveWeekAction extends BaseAction {

	private List<Map> resultList = new ArrayList<Map>();

	private ActiveWeek activityRateWeek;
	private ActiveWeekService activeWeekService;
	private String query_version;
	private String query_dayId;
	private String query_cnts;
	private String query_channelNo;
	private String query_rate;
	private String query_dayId_end;

	public String queryByPage() {
		initPageRender();
		Map queryMap = new HashMap();
		System.out.println(query_version);
		queryMap.put("version", query_version);
		queryMap.put("day_id", query_dayId);
		queryMap.put("day_id_end", query_dayId_end);
		queryMap.put("channelNo", query_channelNo);

		resultList = activeWeekService.queryActiveWeekByPage(queryMap,
				pageRender);
		/*
		 * resultList2 =activeWeekRateService
		 * .queryActivityRateWeekByPage(queryMap, pageRender);
		 */
		/* resultList1.addAll(resultList2); */
		setPageRenderToRequest();
		return "query";
	}

	/**
	 * getters and setters
	 * 
	 * @return
	 */

	public List<Map> getResultList() {
		return resultList;
	}

	public void setResultList(List<Map> resultList) {
		this.resultList = resultList;
	}

	public String getQuery_version() {
		return this.query_version;
	}

	public void setQuery_version(String version) {
		this.query_version = version;
	}

	public void setQuery_dayId(String dayId) {
		this.query_dayId = dayId;
	}

	public String getQuery_cnts() {
		return this.query_cnts;
	}

	public void setQuery_cnts(String cnts) {
		this.query_cnts = cnts;
	}

	/**
	 * @return the activityRateWeek
	 */
	public ActiveWeek getActivityRateWeek() {
		return activityRateWeek;
	}

	/**
	 * @param activityRateWeek the activityRateWeek to set
	 */
	public void setActivityRateWeek(ActiveWeek activityRateWeek) {
		this.activityRateWeek = activityRateWeek;
	}

	public String getQuery_rate() {
		return query_rate;
	}

	public void setQuery_rate(String query_rate) {
		this.query_rate = query_rate;
	}

	public ActiveWeekService getActiveWeekService() {
		return activeWeekService;
	}

	public void setActiveWeekService(ActiveWeekService activeWeekService) {
		this.activeWeekService = activeWeekService;
	}

	public String getQuery_dayId_end() {
		return query_dayId_end;
	}

	public void setQuery_dayId_end(String query_dayId_end) {
		this.query_dayId_end = query_dayId_end;
	}

	public String getQuery_channelNo() {
		return query_channelNo;
	}

	public void setQuery_channelNo(String query_channelNo) {
		this.query_channelNo = query_channelNo;
	}

	public String getQuery_dayId() {
		return query_dayId;
	}

}
